Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--com.pacist.diamonds.DiamondCanvas | +--com.pacist.diamonds.DrawnButton | +--com.pacist.diamonds.PolygonButton
Field Summary | |
java.awt.Polygon | polygon
Internal data structure for the PolygonButton. |
Fields inherited from class com.pacist.diamonds.DrawnButton | |
armed, behaviour, BUTTON, buttonListeners, flags, LABEL, mouseIn, NOTIFY_ARM, NOTIFY_DISARM, RADIO, SHADOW_ALL, SHADOW_BORDER, SHADOW_BOTTOM, SHADOW_LEFT, SHADOW_NONE, SHADOW_RIGHT, SHADOW_ROUNDED, SHADOW_TOP, shadowType, state, states, TOGGLE, tracking, TRISTATE, what |
Fields inherited from class com.pacist.diamonds.DiamondCanvas | |
tipText |
Fields inherited from class java.awt.Component | |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Constructor Summary | |
PolygonButton()
Creates and initializes a PolygonButton object. |
|
PolygonButton(java.awt.Polygon polygon)
Creates and initializes a PolygonButton with BUTTON behaviour, and using the specified polygonal shape. |
|
PolygonButton(java.awt.Polygon polygon,
int behaviour)
Creates and initializes a PolygonButton with the specified behaviour, and using the specified polygonal shape. |
|
PolygonButton(java.awt.Polygon polygon,
int behaviour,
java.lang.Object what)
Deprecated. Creates and initializes a PolygonButton with the specified behaviour, and using the specified polygonal shape. |
Method Summary | |
java.awt.Polygon | getPolygon()
Returns the shape of the button. |
java.awt.Dimension | getPreferredSize()
Returns the preferred size of the PolygonButton. |
java.lang.String | getTipText()
Returns the Tip text for the button. |
boolean | inButton(int x,
int y)
Determines whether a co-ordinate lies inside the button. |
void | paintButton(java.awt.Graphics g,
boolean down)
This method is called to redraw this button. |
java.awt.Dimension | preferredSize()
Deprecated. Returns the preferred size of the PolygonButton. |
void | setPolygon(java.awt.Polygon polygon)
Sets the shape of the button. |
Methods inherited from class com.pacist.diamonds.DrawnButton | |
addActionListener, getBehaviour, getButtonListeners, getNotify, getShadowType, getState, inButton, isArmed, isDown, isSet, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paintButton, paint, processAction, removeActionListener, setArmed, setBehaviour, set, setEnabled, setNotify, setShadowType, setState, setStates |
Methods inherited from class com.pacist.diamonds.DiamondCanvas | |
getTipText, mouseEnter, mouseExit, processMouseEvent, setTipText |
Methods inherited from class java.awt.Canvas | |
addNotify, paint |
Methods inherited from class java.awt.Component | |
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Field Detail |
protected java.awt.Polygon polygon
Constructor Detail |
public PolygonButton()
public PolygonButton(java.awt.Polygon polygon)
polygon
- the shape of the button.- See Also:
- DrawnButton
public PolygonButton(java.awt.Polygon polygon, int behaviour)
polygon
- the shape of the button.
behaviour
- the behaviour of the button.- See Also:
- DrawnButton
public PolygonButton(java.awt.Polygon polygon, int behaviour, java.lang.Object what)
polygon
- the shape of the button.
behaviour
- the behavior of the button.
what
- additional object reference.- See Also:
- DrawnButton
Method Detail |
public void setPolygon(java.awt.Polygon polygon)
polygon
- the shape of the button.
public java.awt.Polygon getPolygon()
public java.awt.Dimension getPreferredSize()
Dimension
- the size of the button.public java.awt.Dimension preferredSize()
public void paintButton(java.awt.Graphics g, boolean down)
g
- the graphics context.
down
- true
if button is currently held down; false
otherwise.public boolean inButton(int x, int y)
x
- the x co-ordinate.
y
- the y co-ordinate.boolean
- true
if the given co-ordinates lie within the button; false
otherwise.public java.lang.String getTipText()
Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |